import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home'
// import TabBar from '@/components/tab-bar'
import Member from '@/views/Member'
import NewsList from '@/views/news/NewsList'
import NewsDetail from '@/views/news/NewsDetail'
import ImgList from '@/views/imgs/ImgList'
import ImgDetail from '@/views/imgs/ImgDetail'
import GoodsList from '@/views/goods/GoodsList'
import GoodsDetail from '@/views/goods/GoodsDetail'
import GoodsComment from '@/views/goods/GoodsComment'
import GoodsDesc from '@/views/goods/GoodsDesc'
import Cart from '@/views/Cart'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/member',
      name: 'member',
      component: Member
    },
    {
      path: '/newslist',
      name: 'newslist',
      component: NewsList
    },
    {
      path: '/newsdetail/:id',
      name: 'newsdetail',
      component: NewsDetail
    },
    {
      path: '/img-list',
      name: 'imglist',
      component: ImgList
    },
    {
      path: '/img_detail/:id',
      name: 'imgdetail',
      component: ImgDetail
    },
    {
      path: '/goods_list',
      name: 'goodslist',
      component: GoodsList
    },
    {
      path: '/goods_detail/:id',
      name: 'goodsdetail',
      component: GoodsDetail
    },
    {
      path: '/goods_detail/:id/goods_comment',
      name: 'goodscomment',
      component: GoodsComment
    },
    {
      path: '/goods_detail/:id/goods_desc',
      name: 'goodsdesc',
      component: GoodsDesc
    },
    {
      path: '/cart',
      name: 'cart',
      component: Cart
    }
  ]
})
